package cn.ycxy.lbl.pojo.order.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 订单数据表
 * </p>
 *
 * @author BaoL
 * @since 2023-04-12
 */
@Data
@ApiModel(value="LblCsOrder对象", description="订单数据表")
public class LblCsOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单编号")
    private String sn;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @NotNull(message = "商品id不能为空")
    @ApiModelProperty(value = "商品id")
    private Long postId;

    @NotNull(message = "商品成交价格不能为空")
    @ApiModelProperty(value = "商品成交价格")
    private BigDecimal dealPrice;

    @NotNull(message = "联系电话不能为空")
    @ApiModelProperty(value = "联系电话")
    private String mobilePhone;

    @ApiModelProperty(value = "状态，0=待发货，1=待收货，2=已完成，3=已取消")
    private Integer state;

    @ApiModelProperty(value = "发货时间")
    private LocalDateTime sendTime;

    @ApiModelProperty(value = "交易成功时间")
    private LocalDateTime finishTime;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "数据最后修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
